package wish.filters;

import java.util.Arrays;


import org.htmlparser.util.NodeList;
import org.htmlparser.util.SimpleNodeIterator;

import wish.model.Record;

public class NumberOfNodesFilter {

	private int number;

	public NumberOfNodesFilter(int number){
		this.number = number;
	}
	
	public Record exceedsNumberOfNodes(Record region){
		
		if (filter(region.getNodeList())){
			return null;
		}
		return region;
	}
	
	private boolean filter(NodeList nodeList){
		
		return nodeList.size() < number;
		
	}
	
}
